ubuntu scripts

network and loading tools

sudo apt-get install htop iftop iotop atop iptraf monit nethogs bmon nmon glances sysstat tcptrack vnstat pktstat ifstat iostat monitorix netwatch trafshow
sudo apt-get install traceroute
sudo apt-get install net-snmp
sudo apt-get install rsync iotop p7zip-full tree hardinfo

haproxy

sudo add-apt-repository ppa:vbernat/haproxy-1.5
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install haproxy
vi /etc/haproxy/haproxy.cfg
default
option forwardfor
option http-server-close
frontend http-frontend
bind public_ip:80
reqadd X-Forwarded-Proto:\ http
default_backend wwwbackend
backend wwwbackend
server 1-www private_ip_1:80 check
server 2-www private_ip_2:80 check
server 3-www private_ip_3:80 check
sudo service haproxy restart

nginx

sudo apt-get install nginx
haproxy -v
vi /etc/default/haproxy
ENABLED=1
sudo service haproxy
sudo service haproxy restart
sudo sh -c “echo \Hostname: webserver01 (192.168.205.16)\<\/h1> >> /var/www/index.html”
sudo sh -c “echo \Hostname: webserver02 (192.168.205.17)\<\/h1> >> /var/www/index.html”
http://192.168.205.15/haproxy?stats